<?php
// define array
$cities = array (
  0 => 'Lucknow',
  1 => 'Patna',
  2 => 'Mumbai',
  3 => 'Ludhiana'
);

// iterate over array
// print each value
for ($i=0; $i<count($cities); $i++) {
  echo $cities[$i] . "<br>";
}

// We can not parse following array with for loop
$cities = array (
  11 => 'Lucknow',
  'string' => 'Patna',
  29 => 'Mumbai',
  67 => 'Noida'
);
